package com.hnx.admin.aurora.security.context;

import org.springframework.security.core.Authentication;

/*
创建人： 倔强的头发
创建时间：2025/6/17
功能描述:

*/
public class AuthenticationContextHolder {
    private static final ThreadLocal<Authentication> contextHolder = new ThreadLocal<>();

    public static Authentication getContext()
    {
        return contextHolder.get();
    }

    public static void setContext(Authentication context)
    {
        contextHolder.set(context);
    }

    public static void clearContext()
    {
        contextHolder.remove();
    }
}
